1. Field of the Invention
The present invention relates to a parallax calculating apparatus and a distance calculating apparatus (so-called stereo image processing apparatus) which use two or more cameras to take a standard picture and a reference picture of an identical object, establish correspondence between pixels of these pictures, and find for each pixel a parallax of the two cameras with respect to the object from two cameras and a distance between the object and the two cameras, methods of the same, information providing media for providing processing of the same, and information providing media for providing the results of the processing.
2. Description of the Related Art
For example, the reference xe2x80x9cVideo-Rate Stereo Machinexe2x80x9d, Kanade and Kimura, Journal of the Robotics Society of Japan (JRSJ), vol. 13, No. 3, pp. 322 to 326, 1995, discloses a so-called stereo image processing apparatus for obtaining parallax information between corresponding pixels between a plurality of pictures obtained by taking pictures of an identical object from two or more locations or taking pictures by two or more cameras and measuring a distance between points on an object or a shape of the object by the same.
When using a stereo image processing apparatus of the related art, however, establishment of correspondence of pixels between a plurality of pictures sometimes becomes inaccurate near the contours of the object depending on the positional relationship between the object and its background. Therefore, it is suffered that the parallax information between pixels and the distance and the shape of the object cannot be measured correctly.
An object of the present invention is to correct the parallax information between pixels obtained from a plurality of pictures of an object to more reliable values.
According to a first aspect of the present invention, there is provided a parallax calculating apparatus comprising a standard picture generating means for generating a standard picture taken of an object at a first view position; a reference picture generating means for generating a reference image taken of said object at a second view position; a detecting means for detecting a corresponding pixel of said reference picture corresponding to a pixel of said standard picture; a parallax calculating means for calculating parallax information between a pixel of said standard picture and a detected corresponding pixel; and a correcting means for correcting parallax information of a pixel to be corrected in a picture corresponding to the parallax information in response to the parallax information of another pixel.
According to a second aspect of the present invention, there is provided a parallax calculating method comprising a standard picture generating step for generating a standard picture taken of an object at a first view position; a reference picture generating step for generating a reference picture taken of said object at a second view position; a detecting step for detecting a corresponding pixel of said reference picture corresponding to a pixel of said standard picture; a parallax calculating step for calculating parallax information between a pixel of said standard picture and a detected corresponding pixel; and a correcting step for correcting parallax information of a pixel to be corrected in a picture given correspondence by the parallax information based on the parallax information of another pixel.
According to a third aspect of the present invention, there is provided an information provision medium providing a processing apparatus with control information having the parallax calculating method of the present invention.
According to a fourth aspect of the present invention, there is provided an information provision medium providing a processing apparatus with parallax information generated by the parallax calculating method of the present invention.
According to a fifth aspect of the present invention, there is provided a distance calculating apparatus comprising; a standard picture generating means for generating a standard picture taken of an object at a first view position; a reference picture generating means for generating a reference picture taken of said object at a second view position; a detecting means for detecting a corresponding pixel of said reference picture corresponding to a pixel of said standard picture; a distance calculating means for calculating distance information between a pixel of said standard picture and a detected corresponding pixel; and a correcting means for correcting distance information of a pixel to be corrected in a picture given correspondence by the distance information based on the distance information of another pixel.
According to a sixth aspect of the present invention, there is provided a distance calculating method comprising; a standard picture generating step for generating a standard picture taken of an object at a first view position; a reference picture generating step for generating a reference picture taken of said object at a second view position; a detecting step for detecting a corresponding pixel of said reference picture corresponding to a pixel of said standard picture; a distance calculating step for calculating distance information between a pixel of said standard picture and a detected corresponding pixel; and a correcting step for correcting distance information of a pixel to be corrected in a picture given correspondence by the distance information based on the distance information of another pixel.
According to a seventh aspect of the present invention, there is provided an information provision medium providing a processing apparatus with control information having the distance calculating method of the present invention.
According to an eighth aspect of the present invention, there is provided an information provision medium providing a processing apparatus with distance information generated by the distance calculating method of the present invention.
In the above aspects of the invention, preferably, the correcting means or step corrects the parallax or distance information at a pixel to be corrected based on parallax or distance information at a pixel positioned near the pixel to be corrected.
Preferably, the correcting means or step corrects the parallax or distance information at a pixel to be corrected by replacing it with parallax or distance information at another pixel.
Preferably, the detecting means or step detects a corresponding pixel using a predetermined evaluation function for a pixel value of a pixel of the standard picture and a pixel value of a pixel of the reference picture.
Preferably, the correcting means or step corrects the parallax or distance information at a pixel to be corrected based on parallax or distance information at another pixel in a predetermined region containing that pixel to be corrected.
More preferably the correcting means or step comprises a selecting means or step for selecting a pixel from the predetermined region based on accuracy of a relationship of correspondence between a pixel of the standard picture, corresponding to a pixel in the predetermined region, and a corresponding pixel of the reference picture and a parallax or distance correcting means or step for correcting the parallax or distance information of the pixel to be corrected based on the parallax or distance information at the pixel selected by the selecting means or step.
Still more preferably, the selecting means or step selects the pixel exhibiting the highest value, among the pixels found, of accuracy of correspondence between the pixel of the standard picture and the corresponding pixel of the reference picture, the pixel of the standard picture and the corresponding pixel of the reference picture being corresponding to the picture in the predetermined region, from the predetermined region.
Still more preferably the selecting means or step selects a pixel by searching through pixels positioned at the outermost circumference of the predetermined region.
Still more preferably the selecting means or step selects a pixel by searching through all pixels in the predetermined region.
Still more preferably the detecting means or step detects a corresponding pixel by using a predetermined evaluation function for a pixel value of a pixel of the standard picture and a pixel value of a pixel of the reference picture and the selecting means or step selects a pixel from the predetermined region by evaluating the accuracy of a relationship of correspondence between the pixel of the standard picture and the corresponding pixel of the reference picture based on the value of the predetermined evaluation function.
Still more preferably the detecting means or step detects a corresponding pixel by using a predetermined evaluation function for pixel values of pixels of the standard picture and pixel values of pixels of the reference picture in a range having a possibility of corresponding to the pixels of the standard picture and the selecting means or step selects a pixel from the predetermined region by evaluating the accuracy of correspondence between the pixel of the standard picture and the corresponding pixel of the reference picture based on the value of the predetermined evaluation function.
Still more preferably the detecting means or step detects a corresponding pixel by using a predetermined evaluation function for pixel values of pixels contained in pixel blocks having pixels of the standard picture as center pixels and pixel values of pixels contained in pixel blocks having as center pixels of the reference picture in a range having a possibility of corresponding to the pixels of the standard picture; the selecting means or step selects from that range the pixel, among those pixels, exhibiting the highest value of accuracy of correspondence between the pixel of the standard picture corresponding to the pixels and the corresponding pixel of the reference picture based on the values of the evaluation function at the pixels contained in the pixel block having the pixel to be corrected as a center pixel; and the parallax or distance correcting means or step corrects the parallax or distance information of the pixel to be corrected by replacing it by the parallax or distance information at the pixel selected by the selecting means or step.
According to a ninth aspect of the present invention, there is provided a distance calculating apparatus comprising; a standard picture generating means for generating a standard picture taken of an object; a reference picture generating means for generating a reference picture taken of said object; a detecting means for detecting a corresponding pixel of said reference picture corresponding to a pixel of said standard picture; a parallax calculating means for calculating parallax information between a pixel of said standard picture and a detected corresponding pixel; a correcting means for correcting parallax information of a pixel to be corrected in a picture given correspondence by the parallax information based on the parallax information of another pixel; and a distance calculating means for calculating a distance to the object based on the corrected parallax information.